Contents | Index | < Browse | Browse >
LETTERmodfULETTER
Splits a floating-point value.
Overview
#include <math.h>
fraction = modf(x,integral);
double fraction;
double x;
double *integral;
Portability
ANSI
Description
This function splits the floating-point value "x" in its integral and
fractional parts. The fractional part is a number between -1 and +1 without
ever reaching these borders. The integral part will be put in the variable
"integral" points to.
Returns
The fractional part as a double-precision floating-point value.